﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Photo.Master" AutoEventWireup="true" CodeBehind="listIMG.aspx.cs" Inherits="Photo.listIMG" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <h2 class="h2-pro">
        Danh sách Img</h2>
    <div class="scroll">
        <asp:GridView ID="gvListImg" runat="server" AutoGenerateColumns="False" CssClass="tstyle2"
            Width="100%" DataKeyNames="ImgID" OnPageIndexChanging="gvListImg_PageIndexChanging"
            OnRowDeleting="gvListImg_RowDeleting" 
            AllowPaging="True" EditRowStyle-HorizontalAlign="Center" PageSize="20" PagerStyle-CssClass="pgr">
            <Columns>
                <asp:TemplateField HeaderText="Ảnh Đại Diện">
                    <ItemTemplate>
                        <a class="fackybox" href='/Media/<%#Eval("Url") %>'>
                            <img src='/Media/<%#Eval("Url") %>' height="60px" width="60px" alt='<%#Eval("Title") %>'
                                title='<%#Eval("Title") %>' />
                        </a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ImgID" HeaderText="ImgID" Visible="false">
                    <HeaderStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Title" HeaderText="Tiêu Đề" ItemStyle-Width="35%" />
                <asp:BoundField DataField="Mota" HeaderText="Mô Tả" ItemStyle-Width="35%" />
                <asp:TemplateField HeaderText="Thao tác">
                    <ItemTemplate>
                         <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("ImgID") %>'
                            CommandName="Delete" ImageUrl="~/image/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                       
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle"></EditRowStyle>
        </asp:GridView>
      
    </div>
</asp:Content>
